Specify the correct parameter for EventHubProducerClient.SendAsync() if text is of type string.
EventHubProducerClient.SendAsync()
text
string
No parameter
new EventData(Encoding.UTF8.GetBytes(text))
new EventData(text)
Encoding.UTF8.GetBytes(text)
Prefer using byte[] with EventData.
byte[]
EventData